<?php
namespace business\user\models;

use business\base\models\BaseActiveRecord;

/**
 * Class BusinessCardModel
 * @package business\user\models
 * @property string recordId
 * @property string userId
 * @property string logo
 * @property string provinceCode
 * @property string cityCode
 * @property string address
 * @property string postion
 * @property string mobile
 * @property string telephone
 * @property string fax
 * @property string website
 * @property string mail
 * @property string postCode
 * @property string type
 * @property string concentration
 * @property string auditStatus
 * @property string name
 * @property string companyId
 * @property string companyName
 * @property string qq
 * @property string weChat
 * @property string microBlog
 * @property string bizTel
 * @property string isShowMobile
 * @property string lastModifiedBy
 * @property string lastModifiedTime
 */
class BusinessCardModel extends BaseActiveRecord
{
    /**
     * +v 用户的审核状态
     * 0 : 未申请
     * 1 : 申请中
     * 2 : 审核通过
     * 3 : 未通过审核
     */
    const BUSINESS_CARD_STATUS_0 = '0';
    const BUSINESS_CARD_STATUS_1 = '1';
    const BUSINESS_CARD_STATUS_2 = '2';
    const BUSINESS_CARD_STATUS_3 = '3';

    public static function tableName()
    {
        return 'b2b_user_business.business_card_record';
    }

    public function getUserIdentity()
    {
        return $this->hasOne(UserIdentityModel::className(), ['user_id' => 'user_id']);
    }

}